class TravelTabModel2 {
  District district;
  String url = "https://m.ctrip.com/restapi/soa2/16189/json/searchTripShootListForHomePageV2?_fxpcqlniredt=09031014111431397988&__gw_appid=99999999&__gw_ver=1.0&__gw_from=10650013707&__gw_platform=H5";
  TravelTabModel2({this.district});

  TravelTabModel2.fromJson(Map<String, dynamic> json) {
//    print('${json}');

    district = json['district'] != null
        ? new District.fromJson(json['district'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.district != null) {
      data['district'] = this.district.toJson();
    }

    return data;
  }
}

class District {
  int districtId;
  String districtName;
  List<TravelTab> groups;

  District({this.districtId, this.districtName, this.groups});

  District.fromJson(Map<String, dynamic> json) {
    districtId = json['districtId'];
    districtName = json['districtName'];
    if (json['groups'] != null) {
      groups = new List<TravelTab>();
      json['groups'].forEach((v) {
        groups.add(new TravelTab.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['districtId'] = this.districtId;
    data['districtName'] = this.districtName;
    if (this.groups != null) {
      data['groups'] = this.groups.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class TravelTab {
  String code;
  String name;
  String note;
  int type;

  TravelTab({this.code, this.name, this.note, this.type});

  TravelTab.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    name = json['name'];
    note = json['note'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['name'] = this.name;
    data['note'] = this.note;
    data['type'] = this.type;
    return data;
  }
}
